
let listeners = {};
let type = 'click';
let callbacks = listeners[type];
const callback1 = ()=>console.log(1);
callbacks=[callback1]
listeners[type]=callbacks;

let callbacks2 = listeners[type];
const callback2 = ()=>console.log(2);
callbacks2.push(callback2);
listeners[type]=callbacks2;

console.log(listeners)